package com.cskaoyan.controller.admin;

import com.cskaoyan.bean.vo.BasePageData;
import com.cskaoyan.bean.vo.BaseParam;
import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.service.AdministrativeRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author XuBang
 * @TODO:
 * @date 2021/10/19$
 * @trainOfthought:
 */
@RestController
@RequestMapping("admin")
public class AdministrativeRegionController {
    @Autowired
    AdministrativeRegionService administrativeRegionService;

    /**
     * 行政区域
     * @return
     */
    //http://182.92.235.201:8083/admin/region/list   GET
    @RequestMapping("region/list")
    public BaseRespVo adminList(){
        BasePageData adminlist=administrativeRegionService.list();
        return BaseRespVo.ok(adminlist);
    }

//    //http://localhost:8083/admin/brand/list?page=1&limit=20&id=1&name=2&sort=add_time&order=desc
//    @RequestMapping("brand/list")
//    public BaseRespVo brandlist(Integer id, String name, BaseParam baseParam){
//        BasePageData brandList=administrativeRegionService.brandLcist(id,name,baseParam);
//        return BaseRespVo.ok(brandList);
//    }

}
